Apple TV Airplay Now Asking for Passcode

Apple TV 4th Gen 32GB with Macbook Pro Mid-2012.


Apple TV is now prompting to enter AirPlay passcode when I attempt to AirPlay from my Macbook Pro. When entering the code on my Macbook Pro (4 digit code that is displayed on the AppleTV) it indicated that password is incorrect. Also.. I did not set this up, this now happens out of nowhere.


I went into AirPlay settings on my Apple TV and verified that there are absolutely no settings that would prompt or require a passcode to be requested. All security measures are shut off. I read a few threads an followed steps to verify this is off. This problem began recently. I am the only person who uses either of these devices. Both devices are on the most recent operating systems. However, I have not updated the operating system or changed settings on either of these devices recently.


I noticed this problem last night. When it first began, my Apple TV displayed a 4-digit code on the screen. I entered this into the prompt on my Macbook Pro. It indicated that this code was incorrect. I tried this many times, leaving both screens and trying over again. I've tried actually setting my OWN AirPlay passcode on the Apple TV, this still would not work when plugging into the passcode prompt on the Macbook Pro. It says its still incorrect.


I've AirPlayed from my Mi-2012 Macbook Pro with success many times. I am on the most recent operating system on both Apple TV and Macbook Pro. Please let me know if you know of any work arounds for this.


Also Noteworthy:

- Both devices are on the same wifi network.

- I can AirPlay from my iPhone 5s without any issues.

Apple TV (4th generation), tvOS 9.2.2, null

Posted on Aug 21, 2016 5:11 PM

Reply
4 replies

Jun 12, 2017 2:50 PM in response to CamTang

I came upon CamTang's exact issue a few hours ago. After searching this forum, I found a thread that found a fix by deleting the "Keychains" folder in the Library folder and re-starting:


1) The fix I found:


Open the "Library" folder in Finder:


Finder/Go/ALT (hold down while clicking Go)/Home/Library


Move the "Keychains" folder to the desktop for safekeeping. This is a "move", not a "copy".

Re-boot and the "Keychains" folder will be re-created. The passcode prompt on Airplay should work now.


If you do it this way, you will need to re-enter all your other passwords that were stored in your old Keychain, but Airplay has been re-set and Apple TV will connect to your Macbook Pro. FYI, I am running EL Capitan 10.11.6 so it appears to be a key corruption issue unrelated to OS. This solution worked for me but I loathed having to re-enter all my old passwords.


2) I developed a better solution (for me) which kept the passwords intact but I had working backup of the "Keychains" folder :


I had a Time Machine back-up of the last time Apple TV mirroring worked which was 1 day before the problem arose.


I moved the newly recreated "Keychains" folder first as the backup would not restore otherwise. I restored the last working "Keychains" folder back to its original location in the Library Folder. I restarted.


Everything now works including AirPlay and all passwords are intact.


Problem fixed for me!


Note: If you don't have a working back-up of the "Keychains" folder, when the "Keychains" folder was re-created (after performing fix 1 above), there were two entries under "Keychains" (the upper left pane) - "Local" in Keychain Access: "AirPlay Pairing Identity..." and "Paired AirPlay Accessary...". I closed "Keychain Access" then copied the old "Keychains" folder from the Desktop to back to the Library folder. I opened Keychain Access but I could not find a "Local" keychain so I did a search for "AirPlay", found the two entries and deleted them, noting that it took two tries before I was allowed to delete the entries. I restarted and after entering the passcode, AirPlay was working again and all my password entries were there although I was now getting password prompts in Safari. I'm not sure why the passwords wouldn't keep but I tried the Time Machine restore next so I didn't troubleshoot that one. If I had to try again, I would restart after copying the old "Keychains" folder back to Library. I would make sure the passwords were still intact and working, then do the "AirPlay" search and delete the 2 entries above. I would then close "KeyChain Access" and restart.


Good Luck!!!

Aug 21, 2016 5:55 PM in response to CamTang

I cannot immediately help you, but another user posted the same issue earlier this year. You might find the thread if you search this forum. It was an identical problem, where the Mac requires a passocde, and rejects any provided value.


Here Re: How do I get Airplay to work from Safari on Mac to Apple TV? and Re: enter passcode on screen comes up wrong are a couple of previous threads. I'd forgotten there was more that one. For one of the users, only one user account was affected. Strange.

Aug 21, 2016 6:21 PM in response to CamTang

I assume you're rebooted both ATV and computer.


This behavior is as if the two devices have different interpretations of the protocol. The computer thinks it needs a passcode, ** t doesn't transmit it correctly to ATV, even when a passcode actually exists, as you described. Also, the initial event is strange, since it would be normal if device verification were enabled. ATV displayed a code, even though verification was not enabled. Since your phone works normally, I think there's some foul-up in the computer implementation.


Just asking, have you experimented with any apps for screen casting, capturing, sharing, etc.? Those have been reported to cause trouble for AirPlay.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple TV Airplay Now Asking for Passcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.